package com.vhall.component.controller.interactive.facade;


import com.vhall.component.entity.interactive.ListReqVo;
import com.vhall.component.entity.interactive.dto.AnswerDto;
import com.vhall.component.entity.interactive.vo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Map;

/**
 * @author xianglei
 * @date 2021/7/8 16:19
 */
@FeignClient(value = "QaFacade", path = "/v4/qa")
public interface QaFacade {

    @PostMapping(value = "/create")
    QuestionRspVo create(@Validated CreateReqVo reqVo);

    /**
     * 公开私密问答
     *
     * @param reqVo
     * @return
     */
    @PostMapping(value = "/show")
    Boolean show(@Validated ShowReqVo reqVo);

    @PostMapping(value = "/answer")
    AnswerDto answer(@Validated AnswerReqVo reqVo);

    @PostMapping(value = "/lists")
    Map<String, Object> lists(@Validated ListReqVo reqVo);

    @PostMapping(value = "/switch")
    Boolean switchs(@Validated SwitchReqVo reqVo);

    @PostMapping(value = "/deal")
    QuestionRspVo deal(@Validated DealReqVo reqVo);

    @PostMapping(value = "/deal-answer")
    AnswerRspVo dealAnswer(@Validated DealAnswerReqVo reqVo);

    @PostMapping(value = "/switch-also-ask")
    Boolean switchAlsoAsk(@Validated SwitchReqVo reqVo);

    @PostMapping(value = "/toggle-also-ask")
    QuestionRspVo toggleAlsoAsk(@Validated ToggleAlsoAskReqVo reqVo);
}
